import Vue from 'vue'
import App from './App'
import socket from 'plus-websocket'
import store from './store'

Vue.config.productionTip = false

App.mpType = 'app'

// Vue.prototype.$store = store

socket.connectSocket({
	url: 'ws://121.199.63.114:9000',
	success: (res) => {
		console.log("success" + res);
	},
	fail: (res) => {
		console.log("fail" + res);
	}
});
//打开连接
socket.onSocketOpen(function(res) {
	console.log('连接成功');
});

//连接错误 
socket.onSocketError(function(res) {
	console.log('WebSocket连接打开失败，请检查！');
});
const app = new Vue({
	store,
	...App
})
app.$mount()
